<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象与基本类型</title>
</head>
<body>
<script>
    var a=new Number(42);
    var b=42;
    console.log(a);
    console.log(b);
    console.log(a==b);//true;
    //虽然a返回的对象，但是a还是和b相等
    var str="sdd";
    var str2=str+"dsadsd";
    console.log(str);
    console.log(str2);
    console.log(str+"12dd");
    var n1=.1;
    var n2=.2;
    console.log(n1+n2==0.3);//false

    var aa=void 0.21;
    var cc=0.21
    console.log(aa,cc);//undefined
    console.log(NaN!=NaN);//true
    console.log(a===a);
    console.log(-0===+0);
    console.log(Object.is(NaN,NaN));//为啥这里是相等，用===却是不等于了
    console.log(Object.is(-0,+0));
    console.log(Object.is(a/"foo",NaN));

</script>
</body>
</html>